{template('../public/header.html')}
<style type="text/css">
#mall_id{
    width: 200px;
}
</style>
<form id="info_form" action="{:U(MODULE_NAME & '/' & ACTION_NAME)}" method="post" enctype="multipart/form-data">
<div class="pad_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">基本信息</li>
			<li>SEO 设置</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
                <table>
                    <tr>
                        <td style="width: 80%;">
            				<table width="100%" cellspacing="0" class="table_form">
            		            <tr>
            						<th style="width: 60px;">歌曲名称:</th>
            						<td style="width: 680px;">
            		                    <input type="text" name="song_name" id="J_title" rel="title_color" class="input-text iColorPicker" size="72" value="" style="width:350px">
            		                    <input type="hidden" value="" name="colors" id="title_color">
										&nbsp;<font color="#FF0000">*</font>&nbsp;
                                        颜色：&nbsp;<select name="colors" >
											<option style="background-color:#FFFFFF;color: #FFFFFF" value="">无色</option>
											<option style="background-color:#00FF00;color: #00FF00" value="#00FF00">绿色</option>
											<option style="background-color:#0000CC;color: #0000CC" value="#0000CC">深蓝</option>
											<option style="background-color:#FFFF00;color: #FFFF00" value="#FFFF00">黄色</option>
											<option style="background-color:#FF33CC;color: #FF33CC" value="#FF33CC">粉红</option>
											<option style="background-color:#FF0000;color: #FF0000" value="#FF0000">红色</option>
											<option style="background-color:#660099;color: #660099" value="#660099">紫色</option>
										</select>
            		                </td>
            					</tr>
                                <tr>
                                    <th>所属歌手：</th>
                                    <td>
                                        <input type="text" name="artist_id" id="J_tags" class="input-text" size="20" value=""/>
          		                        <input type="button" value="选择歌手" id="J_getartist" name="tags_btn" class="btn J_showdialog" href="javascript:void(0);" data-uri="{:U('music/artist_select')}" data-title="选择歌手" data-id="artist_select" data-width="500" data-height="350"/></td>
                                </tr>
                                <tr>
                                    <th>商品链接：</th>                                        
                                    <td>
                                        <input type="text" name="url" class="input-text" size="60"value=""/>                                        
                                    </td>
                                </tr>
                                <tr>
                                    <th>商品价格:</th>
                                    <td><input type="text" name="prices" class="input-text" size="60" value=""/></td>
                                </tr>
            		            <tr>
            						<th>商品图片 :</th>
            						<td>                                    
                                    <input type="file" name="img" class="input-text"  style="width:200px;" />
                                    </td>
            		 			</tr>
            		            <tr>
            						<th>附加信息 :</th>
            						<td>                                    
                                    <textarea name="info" id="info" style="width:100%;height:350px;visibility:hidden;resize:none;"></textarea>
                                    </td>
            		 			</tr>
            				</table>                        
                        </td>
                        <td valign="top">
                            <table width="100%" cellspacing="0" class="table_form inner_table">
            					<tr>
            						<td>  
                                        <div class="box">
                                            <div class="box_title">所属栏目:</div> 
                                            <div class="box_content" style="height: 250px;overflow-y: scroll;">
                                                {$cate_tree}
                                            </div> 
                                        </div>
 			                        </td>
            					</tr>
                                <tr>
                                    <td>
                                        来源:
                                        {:html_select("index",get_index(),null)}
                                        <select name="mall_id"></select>
                                    </td>                                    
                                </tr>
            		            <tr>
            						<td>作者:<input type="text" name="uname" class="input-text" size="30" value="{:AB.Cookie("admin_name")}"/></td>
            					</tr>
                                <tr>
                                    <td>
                                    热门:
                                    <label><input type="radio" name="is_hot" class="radio_style" value="1" /> 是</label>&nbsp;&nbsp;
          							<label><input type="radio" name="is_hot" class="radio_style" value="0" />否</label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    推荐:
                                    <label><input type="radio" name="is_recommend" class="radio_style" value="1" /> 已推荐</label>&nbsp;&nbsp;
          							<label><input type="radio" name="is_recommend" class="radio_style" value="0" />未推荐</label>
                                    </td>
                                </tr>
            					<tr>
            		 				<td>
                                        审核状态:
                                        <label><input type="radio" name="status" class="radio_style" value="1" /> 已通过</label>&nbsp;&nbsp;
            							<label><input type="radio" name="status" class="radio_style" value="0" />未审核</label>
                                    
            						</td>
            					</tr>
                                <tr>
            		 				<td>
                                        定时发布:
                                        <input type="text" name="post_time" id="J_time_start" class="date J_date_picker" size="22" value="{:StdTime(Now())}"/>
            						</td>
            					</tr>
            				</table>                        
                        </td>
                    </tr>
                </table>
			</div>
			<div class="content_list pad_10 hidden">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="120">{:L('seo_title')} :</th>
		 				<td><input type="text" name="seo_title" id="seo_title" class="input-text" size="60" value=""></td>
					</tr>
					<tr>
						<th>{:L('seo_keys')} :</th>
						<td><input type="text" name="seo_keys" id="seo_keys" class="input-text" size="60" value=""></td>
					</tr>
					<tr>
						<th>{:L('seo_desc')} :</th>
						<td><textarea name="seo_desc" id="seo_desc" cols="80" rows="8"></textarea></td>
					</tr>
				</table>
			</div>
        </div>
	</div>
	{template('../public/_submit.html')}
</div>
<input type="hidden" name="menuid"  value="{$menuid}"/>
</form>
{template('../public/footer.html')}
<script src="__STATIC__/js/jquery/plugins/colorpicker.js"></script>
<script src="__STATIC__/js/kindeditor/kindeditor-min.js"></script>
<script>
//$('.J_cate_select').cate_select('请选择');
$(function() {
	KindEditor.create('#info', {
		uploadJson : '{:U("attachment/editer_upload")}',
		fileManagerJson : '{:U("attachment/editer_manager")}',
		allowFileManager : true,
        items:['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
		'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
		'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
		'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen',
		'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
		'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', 'image', 'multiimage', 
		'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
		'anchor', 'link', 'unlink']
	});
	$('ul.J_tabs').tabs('div.J_panes > div');
	//颜色选择器
	$('.J_color_picker').colorpicker();
	//自动获取标签
	$('#J_gettags').live('click', function() {
		var title = $.trim($('#J_title').val());
		if(title == ''){
			$.jframe.tip({content:lang.article_title_isempty, icon:'alert'});
			return false;
		}
		$.getJSON('{:U(MODULE_NAME & "/ajax_gettags")}', {title:title}, function(result){
			if(result.status == 1){
				$('#J_tags').val(result.data);
			}else{
				$.jframe.tip({content:result.msg});
			}
		});
	});    
        
    $('select[name="index"]').change(function(){
        _ajax_mall_list($('option:selected',this).val());
    });	    
    function _ajax_mall_list(index){
        $.post('{:u(MODULE_NAME & "/ajax_mall_list")}',{index:index},function(data){        
            $('select[name="mall_id"]').html(data.data);
        },'json');        
    }
    $('.J_link_tab').each(function(){
        $this=$(this);
        var selected=$this.attr('data-selected');
        if($.trim(selected).length==0){
            selected='taobao';
        }
        $select_item=$('.tab_menu .tab_item[data-data="'+selected+'"]',$this);
        $select_item.attr('checked','checked');
        $('.tab_content .tab_item',$this).eq($select_item.index()).show().siblings().hide();
        $('.tab_menu .tab_item',$this).click(function(){
            $('.tab_content .tab_item',$this).eq($(this).index()).show().siblings().hide();
        });         
    });    
    $('.btn_b2c').click(function(){
        var link=$.trim($('.link_b2c').val());
        if(link.length>0){
            $.get("{:U(MODULE_NAME & '/convert_link')}",{link:link},function(data){
                if(data.status==1){
                    $('.url_b2c').val(data.data);
                }
            },'json');
        }
    });
});
</script>
</body>
</html>